sound object

This method will start the sound playback and set it to loop forever.

bool play_looped()

Parameters:
None.

Return value:
true on success, false on failure.

Remarks:
This method will start the playback of the sound in a looped state, meaning that it keeps repeating until a method such as "pause" or "stop" is called, or alternatively until the object is destroyed.

Example:
// Play a sound and loop it until the user presses space.

void main()
{
sound ambience;
ambience.load("ding.ogg");
show_game_window("Sound Test");
if(ambience.active==false)
{
alert("Error", "The sound could not be loaded.");
exit();
}
ambience.play_looped();
while(key_pressed(KEY_SPACE)==false)
{
wait(5);
}
}